home *** CD-ROM | disk | FTP | other *** search
- global gDBTextVarList
-
- on InitButtons EnableScroll
- MyObj = getaProp(gDBTextVarList, GetObjProp())
- ButtonList = GetButtonList(MyObj)
- SpList = GetSpriteList(MyObj)
- cbs = getaProp(SpList, #closeBox)
- mmbs = getaProp(SpList, #MaxMinBox)
- CopyBS = getaProp(SpList, #CopyButton)
- PrintBS = getaProp(SpList, #PrintButton)
- SaveBS = getaProp(SpList, #SaveButton)
- addProp(ButtonList, cbs, new(script("close box"), "close box", "global", cbs, the loc of sprite cbs))
- addProp(ButtonList, mmbs, new(script("max min box"), "min max", "global", mmbs, the loc of sprite mmbs))
- addProp(ButtonList, CopyBS, new(script("copy icon"), "copy", "internal", CopyBS, the loc of sprite CopyBS))
- addProp(ButtonList, PrintBS, new(script("print icon"), "print", "internal", PrintBS, the loc of sprite PrintBS))
- addProp(ButtonList, SaveBS, new(script("save icon"), "save", "internal", SaveBS, the loc of sprite SaveBS))
- SetButtonList(MyObj, ButtonList)
- repeat with rc in ButtonList
- Inscope(rc)
- end repeat
- disable(getaProp(ButtonList, CopyBS))
- EvalDisableScroll(EnableScroll)
- repeat with rc in [cbs, mmbs, PrintBS, SaveBS]
- set the cursor of sprite rc to GetPointingCursor(MyObj)
- end repeat
- end
-
- on EvalDisableScroll EnableScroll
- MyObj = getaProp(gDBTextVarList, GetObjProp())
- ButtonList = GetButtonList(MyObj)
- SpList = GetSpriteList(MyObj)
- vbs = getaProp(SpList, #VBed)
- nas = getaProp(SpList, #NArrow)
- sas = getaProp(SpList, #SArrow)
- vts = getaProp(SpList, #VThumb)
- repeat with rc in [nas, sas, vts, vbs]
- if EnableScroll then
- Inscope(getaProp(ButtonList, rc))
- next repeat
- end if
- disable(getaProp(ButtonList, rc))
- end repeat
- end
-